<template>
<!-- 封装头部导航组件 -->
    <div class="headnav-box">
        
       <van-nav-bar :title="title" 
       :left-text="leftTtext" 
       :right-text="rightText" 
       :fixed='fixed' 
       left-arrow
        @click-left="back"
       
       >

           <!-- 使用插槽可自定图标样式 -->
           
        </van-nav-bar>
       
    </div>
</template>

<script>
    import { Toast } from 'vant';


    export default {
        name:'Headnav',
        

        props:{
            
            title:{
                type:String,
                default:''
            },
            leftTtext:{
                type: String,
                default: ''
            },
            rightText: {
                type: String,
                default: ''
            },
            fixed: {
                type: Boolean,
                default: false
            },
            
            
            
        

        },
        

        components:{
            Toast,
        },

        methods:{
           back(value){
                this.$router.back();
            },

            goTo(){
                // this.$router.push({name: 'Home', params: {}}); 
                this.$router.go(0);
            }
            

        }



    }
</script>

<style lang="less" >
    
    .headnav-box{
       
       
     .van-nav-bar__content{
       
        border-bottom: 1px solid rgb(216, 213, 213);
    }


    .van-nav-bar .van-icon {
    color: #000000;
    }


    .share{
        display: flex;
    }
    

    }
   

</style>